import Cookies from 'js-cookie'

const TokenKey = 'HRSAAS_TOKEN'
const TOKENTIME = 'TOKENTIME'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 存本地时间戳
export function setTokenTime() {
  Cookies.set(TOKENTIME, Date.now())
}

// 获取本地时间戳
export function getTokenTime() {
  return Cookies.get(TOKENTIME)
}
